<template>
  <view class="bg-gradual-blue"
        style="height: 20vh;">
  </view>
  <view class="bg-white radius-top-xl padding-xs flex"
        style="position: absolute;top: 10vh; width: 100vw;min-height: 90vh">
    <view style="position: absolute;top: -30px;left: 50%;transform: translate(-50%,0)" class="text-center">
      <view>
        <MrAvatar :src="userStore.userInfo.avatar" :size="148"></MrAvatar>
      </view>
      <view class="text-center text-lg text-bold text-black">{{ userStore.userInfo.username }}</view>
    </view>
    <view :style="{marginTop: uni2px(180)+'px'}"
          class="flex flex-sub flex-direction solids-top">
      <view v-if="userStore.userInfo.status===1">
        <view class="cu-list margin padding-xs menu radius-lg  shadow bg-white">
          <navigator class="cu-item arrow" url="/pages/common/role/choose">
            <view class="content">
              <text class="cuIcon-addressbook text-grey"></text>
              <text class="text-black">身份认证</text>
            </view>
          </navigator>
        </view>
      </view>
      <view v-else-if="userStore.userInfo.status===2">
        <PatientMine></PatientMine>
      </view>
      <view v-else-if="userStore.userInfo.status===3">
        <NurseMine></NurseMine>
      </view>
      <view v-else-if="userStore.userInfo.status===4">
      </view>
      <view v-else-if="userStore.userInfo.status===33">
        <view class="cu-list margin-xs padding-xs menu radius-lg  solid shadow bg-white">
          <view class="cu-item">
            <view class="content">
              <text class="cuIcon-circlefill text-grey"></text>
              <text class="text-black">护士待审核</text>
            </view>
          </view>
        </view>
      </view>
      <view v-else-if="userStore.userInfo.status===44">
        专家待审核
      </view>
      <view class="cu-list margin padding-xs menu radius-lg  solid shadow bg-white">
          <navigator class="cu-item arrow" url="/pages/user/message/ai/ai">
              <view class="content">
                  <text class="cuIcon-emojifill text-grey"></text>
                  <view class="cu-tag badge">
                      new
                  </view>
                  <text class="text-black">智慧助手</text>
              </view>
          </navigator>
        <navigator class="cu-item arrow" url="/pages/common/feedback/index">
          <view class="content">
            <text class="cuIcon-questionfill text-grey"></text>
            <text class="text-black">问题反馈</text>
          </view>
        </navigator>
        <navigator class="cu-item arrow" url="/pages/common/setting/index">
          <view class="content">
            <text class="cuIcon-settingsfill text-grey"></text>
            <text class="text-black">设置</text>
          </view>
        </navigator>
      </view>
    </view>
  </view>


</template>

<script setup lang="ts">
import {useUserStore,} from '@/store'
import PatientMine from "@/pages/user/mine/components/PatientMine.vue";
import NurseMine from "@/pages/user/mine/components/NurseMine.vue";
import MrAvatar from "@/components/common/MrAvatar.vue";
import {uploadFile} from '/settings'
import {uni2px} from "@/utils";

const url = uploadFile.url
const name = uploadFile.name
const userStore = useUserStore()




</script>

<style scoped>

</style>
